/**********
 * energy_model.h
 * by Mina Jung @SU (March 2010)
 * Energy model for the micaZ
 * based on mica2 model
 * see http://www.eecs.harvard.edu/~shnayder/ptossim/ for details
 * Lines starting with '#' are comments

 * Format: KEY\s+VALUE
 * Unless otherwise specified, VALUE is a current in mA
 * Value is always assumed to be a number
 ***************/

#define VOLTAGE	 			3.0

/******************
 * CPU numbers:
 * Idle mode is what the CPU is in when not actively executing, but 
 * no special action is taken.  The per-active-cycle numbers are added 
 * on top of that
 * Added .93mA to idle and active cpu power to account for the
 * oscillator.  Need to make it separate later...
 ***************/

#define CPU_ACTIVE			8.93
#define CPU_IDLE			4.93 // AOC: 4mA + 0.93
#define CPU_ADC_NOISE_REDUCTION		0.32
#define CPU_POWER_DOWN			0.0003 
#define CPU_POWER_SAVE			0.009 
#define CPU_STANDBY			1 
#define CPU_EXTENDED_STANDBY		0.25 


/******************
 * The startup mode for the cpu
 ***************/
#define CPU_INIT			3.2 

#define CPU_FREQ			7382800

#define RADIO_TX_FB			16.5
#define RADIO_TX_F7			15.2
#define RADIO_TX_F3			13.9	   
#define RADIO_TX_EF 			12.5	   
#define RADIO_TX_EB			11.2	   
#define RADIO_TX_E7			9.9	   
#define RADIO_TX_E3			8.5	 
#define RADIO_TX_FF			17.4
 
/******************
 * need to interpolate the above, but no point until the TX setting code
 * works
 ***************/

#define RADIO_RX 			19.7
#define RADIO_OFF			0 
 

/******************
 * The default power mode
 ***************/
#define RADIO_DEFAULT_POWER  		255.0 // 0xFF

/******************
 * LED
 ***************/
#define LED				2.2 // same as mica2, though some refs. indicate higher
/******************
 *default to off
 ***************/
#define LED_INIT			0

/******************
 * EEPROM         
 ***************/
#define EEPROM_READ			6.24 // AOC: assume same as mica2
#define EEPROM_WRITE			18.40 // AOC: assume same as mica2


/******************
 *ADC  
 *VS: we thought it took power, so it's tracked, but it actually doesn't
 ***************/
#define ADC				0.0 // AOC: mica2 # VK  - 1.32mA 

/******************
 *VS: If the sensor board is plugged in, it draws this much current at all times
 ***************/
#define SENSOR_BOARD			0.69 // AOC: assume same as mica2

/******************
 *VS: Sensors - don't actually use power beyond the general sensor board power
 ***************/
#define SENSOR_PHOTO			0 
#define SENSOR_TEMP			0 




 

